/*
 * Copyright (c) 2023, 2023,yzc.cn All rights reserved.
 *
 */
package com.crmapi.controller;

import com.crmapi.pojo.PageBean;
import com.crmapi.pojo.Result;
import com.crmapi.service.ApprovalService;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>Project: CRMSystem - ApprovalController</p>
 * <p>Powered by yzc On 2023-12-05 11:32:04</p>
 * <p>描述：<p>
 *
 * @author yzc [yzc0415@126.com]
 * @version 1.0
 * @since 17
 */
@RestController
@RequestMapping("/api_v1.0")
@Api(tags = "审批管理")
@Slf4j
public class ApprovalController {

    @Autowired
    ApprovalService approvalService;

    @PostMapping("/approval/list")
   public Result queryList(@RequestParam(defaultValue = "1") Integer page ,
                           @RequestParam(defaultValue = "10") Integer pageSize , String code, String applicant, Integer type, String apptime, Integer status){
       PageBean pageBean = approvalService.queryList(page, pageSize, code, applicant, type, apptime, status);
       return Result.success(pageBean);
   }
}
